﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using DongleManage.Model.BaseClass;
using System.Data;

namespace  DongleManage.Model.Member
{

		
	/// <summary>
	///  教练和学生相互分组
	/// </summary>
	/// <remarks>
	/// 该实体由工具生成，尽量不要手动修改
	/// </remarks>
	[DataContract]
	public partial class GroupInfoEntity :BaseEntity
	{
		#region 属性、变量声明
		#region 主属性 --对应数据表主键
		/// <summary>			
		/// GroupID : 分组ID
		/// </summary>
		/// <remarks>表GroupInfo主键</remarks>
        [DisplayName("分组ID")]
		[DataMember]
		public Int32 GroupID
        {
            get;
            set;
        }
		/// <summary>			
		/// 会员或教练ID 
		/// </summary>
		/// <remarks>表GroupInfo主键</remarks>
		[DisplayName("")]
		[DataMember]
		public Int32 MemberID
        {
            get;
            set;
        }
		#endregion
		
		#region 属性
		
		/// <summary>
		/// 分组名称
		/// </summary>
        [DisplayName("分组名称")]
        [StringLength(64, ErrorMessage = "请勿输入超过 64 个字!")]
        
		[DataMember]
		public String GroupName
        {
            get;
            set;
        }
		
		#endregion

		#endregion 属性、变量声明
		
	    public GroupInfoEntity()
        {
            GroupID = (int)0;
            GroupName = null;
            MemberID = (int)0;

        }

        public GroupInfoEntity(IDataReader dataReader):base(dataReader)
        {
            MemberID = Convert.IsDBNull(dataReader["MemberID"]) ? 0 : Convert.ToInt32(dataReader["MemberID"]);
            GroupName = Convert.IsDBNull(dataReader["GroupName"]) ? "" : Convert.ToString(dataReader["GroupName"]);
            GroupID = Convert.IsDBNull(dataReader["GroupID"]) ? 0 : Convert.ToInt32(dataReader["GroupID"]);

        }
	}
}
